import { defineStore } from 'pinia'

export const userStore = defineStore('user', {
  state: () => ({
    id: 0,
    name: '',
    role: 0,
  }),
  actions: {
    setRole(value) {
      this.role = value
    },
    setId(value) {
      this.id = value
    },
    setName(value) {
      this.name = value
    },
  },
  persist: true,
})
